import java.awt.Robot;

/**
 * Clock
 */
public class Clock {
    private Display sec = new Display(60);
    private Display min = new Display(60);
    private Display hour = new Display(24);

    public Clock(int hour, int minute, int second) {
        this.sec.setValue(second);
        this.min.setValue(minute);
        this.hour.setValue(hour);
    }

    /**
     * 滴答.
     */
    public void tick() {
        sec.increase();
        if (sec.getValue() == 0) {
            min.increase();
            if (min.getValue() == 0)
                hour.increase();
        }
    }

    public String toString() {
        return String.format("%02d:%02d:%02d", hour.getValue(), min.getValue(), sec.getValue());
    }

    public static void main(String[] args) throws Exception {

        java.util.Scanner in = new java.util.Scanner(System.in);

        Clock clock = new Clock(in.nextInt(), in.nextInt(), in.nextInt());

        Robot r = new Robot();
        for (int i = 0; i < 100; i++) {
            clock.tick();

            System.out.println(clock);
            r.delay(1000);
        }

        System.out.println(clock);

        in.close();

    }

}

/**
 * Display
 */
class Display {

    private int limit = 0;
    private int value = 0;

    public Display(int limit) {
        this.limit = limit;
    }

    public void increase() {
        if (++value == limit) {
            value = 0;
        }
    }

    public void setValue(int value) {
        if (value < this.limit) {
            this.value = value;
        }
    }

    public int getValue() {
        return value;
    }

}